import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Balasup here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Balasup extends BalaEne
{
    /**
     * Act - do whatever the Balasup wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     * Estabas balas se iran moviendo hacia arriba
     */
    public void act() 
    {
    {
        Actor Jug = getOneIntersectingObject(Jugador.class);
        
        x=getX();
        y=getY()+4;
        setLocation(x,y);
        if (getY()>=getWorld().getHeight()-1||Jug!=null)
        {
            getWorld().removeObject(this);
        }
    }
    }    
}
